package extend;

public class Child extends Parent{
    private int c1=21;
    public int c2=22;

    private void cm1(){System.out.println("in cm1() c1="+c1);}

    public void cm2(){System.out.println("in cm2() C2="+c2);}

    public static void main(String[] args) {
        int i;
        Parent p = new Parent();
        i = p.f2;
        p.fm2();

        Child c = new Child();
        i = c.f2;
        i = c.c1;
        c.cm1();
        System.out.println(i);//优先输出同文件的值
    }
}
